package com.inspur.gs.sbssdl.sbwhgl.sbwhby.sbwhby.front.newsbbyjh_frm.voactions;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * 表示一个设备类级的保养周期模板
 * 包含一组月份和对应的保养类型
 */
public class MaintenancePattern {
    private final List<Integer> months; // 保养月份（1-12）
    private final List<String> types;   // 保养类型："1"=一保, "2"=二保

    public MaintenancePattern(List<Integer> months, List<String> types) {
        this.months = Collections.unmodifiableList(new ArrayList<>(months));
        this.types = Collections.unmodifiableList(new ArrayList<>(types));
    }

    public List<Integer> getMonths() {
        return months;
    }

    public List<String> getTypes() {
        return types;
    }

    public int getStartMonth() {
        return months.isEmpty() ? 0 : months.get(0);
    }

    @Override
    public String toString() {
        return "MaintenancePattern{" +
                "months=" + months +
                ", types=" + types +
                '}';
    }
}